package com.ydl.learning.flink.demo.transformations

import com.ydl.learning.flink.demo.Utils
import org.apache.flink.api.scala._

/**
 * 具体使用可参考GroupBy里的reduce操作
 *
 * @author ydl
 * @since 2020/9/22
 */
object ReduceDemo extends App with Utils {
  val intNumbers = env.fromElements(1, 2, 3)
  val sum = intNumbers.reduce(_ + _)
  sum.print()

}
